package com.ihg.hiex.admin.dao.session;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.session.during.SessionCalibration;
import com.ihg.hiex.entity.session.during.report.SessionReportWriting;

/**
 * 
 * @author dan
 *
 */
@Dao("hibernate")
public interface SessionReportWritingDao {
    
    /**
     * 
     * @param sessionCalibration
     * @return
     */
    @Query("FROM SessionReportWriting WHERE disabled = false AND sessionCalibration = :sessionCalibration")
    public SessionReportWriting load(@Variable("sessionCalibration") SessionCalibration sessionCalibration);
    
    /**
     * 
     * @param sessionCalibrations
     * @return
     */
    @Query("FROM SessionReportWriting WHERE disabled = false AND sessionCalibration in(:sessionCalibrations)")
    public List<SessionReportWriting> list(@Variable("sessionCalibrations") List<SessionCalibration> sessionCalibrations);
    
    /**
     * 
     * @param session
     * @return
     */
    @Query("FROM SessionReportWriting WHERE disabled = false AND sessionCalibration.session = :session")
    public List<SessionReportWriting> list(@Variable("session") Session session);

}
